package com.mf.service;

import com.mf.bo.CodeDateScopedBo;
import com.mf.bo.DateScopedBo;
import com.mf.bo.calculateHistory.SumCalculateHistoryBo;
import com.mf.entity.Code;
import com.mf.entity.CodeHistory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mf.entity.Positions;
import com.mf.service.utils.numericalProcedure.CalculateProcedure.CalculateProcedure;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 股票推荐表 服务类
 * </p>
 *
 * @author mf
 * @since 2024-06-02
 */
public interface ICodeHistoryService extends IService<CodeHistory> {

    void saveBatchAll(DateScopedBo dateScopedBo, List<Code> codeList);


    List<CodeHistory> dateScopedList(CodeDateScopedBo codeDateScopedBo);

    List<CodeHistory> getByCodeListHistory(List<String> ListDm);

    List<CodeHistory> getCodeHistories(DateScopedBo dateScopedBo);

    /**
     * 计算指定日期可买入的数据
     */
    List<String> calculateHistoryByDate(CodeDateScopedBo codeDateScopedBo);

    SumCalculateHistoryBo findAllDate(DateScopedBo dateScopedBo, CalculateProcedure calculateProcedure);

    void deleteAllDateScope(CodeDateScopedBo codeDateScopedBo);


    Map<String,List<CodeHistory>> findAllDateByDm(List<Positions> positionsDetail);


    void setNewHistory(String dm);

    List<CodeHistory> getHistoryList(DateScopedBo dateScopedBo, String dm, String type);

    List<CodeHistory> getCodeHistoriesByCodeDateScoped(CodeDateScopedBo dateScopedBo1);
}
